﻿<UserControl
  x:Class="QuickTweet.TweetPopup"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 xmlns:controls="clr-namespace:QuickTweet.Common.Controls;assembly=QuickTweet.Common"
  Height="200" Width="500">
    <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Margin="5" CornerRadius="10">
        <Border.Effect>
            <DropShadowEffect Color="#FF474747" />
        </Border.Effect>
        <Border.Background>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="LightGray" Offset="0" />
                <GradientStop Color="WhiteSmoke" Offset="1" />
            </LinearGradientBrush>
        </Border.Background>
        <Grid Margin="10">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="Auto"></RowDefinition>
            </Grid.RowDefinitions>
            <TextBlock Text="Write your tweet:" Style="{StaticResource DefaultTextStyle}" FontWeight="Bold" Margin="5"></TextBlock>
            <Border BorderThickness="3" Grid.Row="1" Margin="5" CornerRadius="10">
                <Border.Effect>
                    <DropShadowEffect Color="LightBlue" BlurRadius="20" />
                </Border.Effect>
                <controls:AutoCapitalizeTextBox BorderThickness="0" BorderBrush="Transparent" x:Name="txtTweet" MaxLength="140" TextWrapping="Wrap" Margin="2" ScrollViewer.VerticalScrollBarVisibility="Auto"  Style="{StaticResource DefaultTextStyle}"
                         Text="{Binding Path=Tweet, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"></controls:AutoCapitalizeTextBox>
            </Border>
            <Grid Grid.Row="2">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock HorizontalAlignment="Right" VerticalAlignment="Center" Text="{Binding Path=RemainingCharacters}" Style="{StaticResource DefaultTextStyle}" Margin="10"></TextBlock>
                <Button Content="Tweet" Grid.Column="1" Height="30" Padding="5" Margin="5" Style="{StaticResource DefaultTextStyle}"
                        Command="{Binding Path=SendTweetCommand}" IsDefault="True"></Button>
            </Grid>
        </Grid>
    </Border>

</UserControl>
